#!/bin/bash 

DATE=$(date)
TIMESTAMP=$(date +%s)

ClearToPush=/home/pi/clearToPush

echo $1 $2 >> /tmp/testPush.lg



if [  -f "$ClearToPush" ]
then
    echo " I aM Clear to Send" >> /tmp/push.log

curl -s  \
  -F "token=a5CGnRfwJrBC6UCJwuK2rvtbZrp6hN" \
  -F "user=u43VJnyKANANkM2eKJ7JMSXM5khqSZ" \
  -F "title=$2" \
  -F "timestamp=$TIMESTAMP" \
  -F "message=$1 " \
  https://api.pushover.net/1/messages.json

else
   echo " IN TEST MODE"  >>  /tmp/push.log
   echo -e "\n$1 \n $2 \n" >> /tmp/push.log 

fi



